<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <title>内容发布</title>
    <link rel="stylesheet" href="../common/lib/semantic/semantic.min.css">
    <link rel="stylesheet" href="../common/css/base.css">
    <link rel="stylesheet" href="../common/css/header.css">
    <link rel="stylesheet" href="../common/css/left.css">
    <link rel="stylesheet" href="css/release.css">
    <link rel="icon" href="img/favicon.png" mce_href="img/favicon.png" type="image/x-icon">
</head>
<body>
<div id="header">
    <div class="view_item" v-on:click="iLeft" ><i class="pointing left icon"></i></div>
    <div class="left">
        <div class="item"><i class="home icon"></i>AccurMedicine</div>
    </div>
    <div class="center">
        <span class="text">APP内容管理发布工具</span>
    </div>
    <div class="right">
        <div class="item"><i class="user icon"></i>Admin</div>
        <div class="item"><i class="sign out icon"></i> </div>
    </div>
</div>
<div class="container">
    <div id="left">
        <left></left>
    </div>
    <div id="right">
        <div class="navigation">
            <div class="ui breadcrumb">
                <div class="section">首页</div>
                <i class="right angle icon divider"></i>
                <div class="section">内容管理</div>
                <i class="right angle icon divider"></i>
                <div class="active section">内容创建</div>
            </div>
        </div>
        <div id="app_release">
            <div class="ui form">
                <div class="field">
                    <label>栏目名称</label>
                    <select class="ui search dropdown" v-model="form_data.module_name">
                        <option value="心脑血管">心脑血管</option>
                        <option value="内分泌">内分泌</option>
                        <option value="代谢疾病">代谢疾病</option>
                        <option value="呼吸系统">呼吸系统</option>
                    </select>
                </div>
                <div class="field">
                    <label>标题</label>
                    <input type="text" placeholder="请输入标题" v-model.trim="form_data.name"/>
                </div>
                <div class="field">
                    <label>简短描述</label>
                    <textarea rows="2" placeholder="请输入描述" v-model.trim="form_data.description"></textarea>
                </div>
                <div class="field">
                    <label>关键字</label>
                    <input type="text" v-model.trim="form_data.keyword" placeholder="多个词，用逗号隔开，为广告时，此项不填写"
                           v-bind:disabled="form_data.type == '广告'?true:false" v-bind:value="form_data.type == '广告' ? '': form_data.keyword "/>
                </div>
                <div class="field">
                    <label>来源/作者</label>
                    <input type="text" v-model="form_data.source" placeholder="可以不填写"/>
                </div>
                <div class="field">
                    <div class="ui radio checkbox">
                        <input type="radio" value="1" v-model="form_data.type" checked="" />
                        <label>网站内容</label>
                    </div>
                    <div class="ui radio checkbox">
                        <input type="radio" value="2"   v-model="form_data.type" />
                        <label>广告</label>
                    </div>
                </div>
                <div class="field">
                    <label>内容</label>
                    <textarea v-model.trim="form_data.content" placeholder="请输入内容"></textarea>
                </div>
                <div class="field">
                    <label>APP中目录显示样式</label>
                    <div class="app_style_1">
                        <div class="ui radio checkbox">
                            <input type="radio" value="1" v-model="form_data.style" checked="" />
                            <label>app样式一</label>
                        </div>
                        <div class="style_content">
                            <div>标题</div>
                            <div>简短描述性内容</div>
                            <div>来源/作者</div>
                            <div>跟帖数量</div>
                        </div>
                    </div>
                    <div class="app_style_2">
                        <div class="ui radio checkbox">
                            <input type="radio"  value="2" v-model="form_data.style" />
                            <label>app样式二</label>
                        </div>
                        <div class="style_content">
                            <div>图片</div>
                            <div>标题</div>
                            <div>来源/作者</div>
                            <div>跟帖数量</div>
                        </div>
                    </div>
                    <div class="app_style_3">
                        <div class="ui radio checkbox">
                            <input type="radio"   value="3" v-model="form_data.style" />
                            <label>app样式三</label>
                        </div>
                        <div class="style_content">
                            <div>标题</div>
                            <div>图片</div>
                            <div>来源/作者</div>
                            <div>跟帖数量</div>
                        </div>
                    </div>
                    <div class="app_style_4">
                        <div class="ui radio checkbox">
                            <input type="radio"  value="4" v-model="form_data.style" />
                            <label>app样式四</label>
                        </div>
                        <div class="style_content">
                            <div>标题</div>
                            <div>图片1</div>
                            <div>图片2</div>
                            <div>图片3</div>
                            <div>来源/作者</div>
                            <div>跟帖数量</div>
                        </div>
                    </div>
                </div>
                <div class="upload_img_ground" v-show="form_data.type == '1' ? form_data.style == 1 ? false : true : true">
                    <div class="img_address first" v-show="form_data.type == '2' ? form_data.style == 1 || form_data.style == 2 ? true : false :
                                          form_data.app_style == 1 ? false : true">
                        <label>图片地址一</label>
                        <div class="thumb_img">
                            <img src="img/favicon.png"/>
                            <span>无图片</span>
                            <i v-on:click="clear('upload_img_1')" class="remove circle outline icon"></i>
                        </div>
                        <div class="upload_input">
                            <div class="ui  buttons">
                                <button class="ui twitter button" v-on:click="img_select('upload_img_1')"><i class="upload icon"></i>选择图片</button>
                                <div class="or" data-text="ou"></div>
                                <button class="ui blue button" v-on:click="img_upload('upload_img_1')">上传</button>
                            </div>
                            <input type="file" v-on:change="img_change($event)"  name="upload_img_1" id="upload_img_1" class="hidden"/>
                        </div>
                    </div>
                    <div class="img_address second" v-show="form_data.type == '2'? false : form_data.style == 4 ? true : false">
                        <label>图片地址二</label>
                        <div class="thumb_img">
                            <img src="img/favicon.png"/>
                            <span>无图片</span>
                            <i v-on:click="clear('upload_img_2')" class="remove circle outline icon"></i>
                        </div>
                        <div class="upload_input">
                            <div class="ui buttons">
                                <button class="ui twitter button" v-on:click="img_select('upload_img_2')"><i class="upload icon"></i>选择图片</button>
                                <div class="or" data-text="ou"></div>
                                <button class="ui blue button" v-on:click="img_upload('upload_img_2')">上传</button>
                            </div>
                            <input type="file" v-on:change="img_change($event)" name="upload_img_2"  id="upload_img_2" class="hidden"/>
                        </div>
                    </div>
                    <div class="img_address third" v-show="form_data.type == '2' ? false : form_data.style == 4 ? true : false">
                        <label>图片地址三</label>
                        <div class="thumb_img">
                            <img src="img/favicon.png"/>
                            <span>无图片</span>
                            <i v-on:click="clear('upload_img_3')" class="remove circle outline icon"></i>
                        </div>
                        <div class="upload_input">
                            <div class="ui buttons">
                                <button class="ui twitter button" v-on:click="img_select('upload_img_3')"><i class="upload icon"></i>选择图片</button>
                                <div class="or" data-text="ou"></div>
                                <button class="ui blue button" v-on:click="img_upload('upload_img_3')">上传</button>
                            </div>
                            <input type="file" v-on:change="img_change($event)" name="upload_img_3" id="upload_img_3"  class="hidden"/>
                        </div>
                    </div>
                </div>
                <div class="inline field">
                    <div class="ui slider checkbox">
                        <input type="checkbox" v-model="form_data.status"/>
                        <label>保存时发布内容</label>
                    </div>
                </div>
                <button class="fluid linkedin ui button" v-on:click="save">保存</button>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript" src="../common/lib/jquery.min.js"></script>
<script type="text/javascript" src="../common/lib/ajaxfileupload.js"></script>
<script type="text/javascript" src="../common/lib/vue.js"></script>
<script type="text/javascript" src="../common/js/header.js"></script>
<script type="text/javascript" src="../common/js/left.js"></script>
<script type="text/javascript" src="./js/release.js"></script>
</html>